import React, { useEffect, useState } from 'react';
import { Table } from 'antd';
import {getMyStudent}from '../../api/myStudent'

const columns = [
  {
    // title: 'Address',
    dataIndex: 'num',
  },
  {
    title: '奖惩',
    dataIndex: 'tite',
    width: 150,
  },
  {
    title: '补贴额',
    dataIndex: 'age',
    width: 150,
  },
  {
    title: '补贴形式',
    dataIndex: 'xins',
  },
  {
    title: '审核',
    dataIndex: 'shez',
  },
 
  
];
const data = [];
for (let i = 0; i < 20; i++) {
  data.push({
    key: i,
    name: ` ${i}`,
    age: 100,
    address: ` 节日${i}`,
    num:`${i}`,
    xins:'支付宝',
    shez:'审核中',
    tite:'补贴'

  });
}
const App = () => 
{ const [sup ,setsup]=useState({})
useEffect(()=>{
  getMyStudent().then(res=>{
    // console.log(res.data.data[0].name);
    setsup(res.data.data[0].name)
  })
})
  return(

  <Table
    columns={columns}
    dataSource={data}
    pagination={{
      pageSize: 50,
    }}
    scroll={{
      y: 240,
    }}
  />
);}
export default App;